package pers.crayon.baseprogram.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

import java.text.MessageFormat;

/**
 * 几个联系人
 * 字符串组枚举
 *
 * @author roamay.com
 * @since 2021/11/10 9:14
 */
@AllArgsConstructor
public enum ContactEnum {


    CONTACT_AUTHOR("姓名:{0}\n" +
            "联系方式:{1}\n");

    @Getter
    @Setter
    private String pattern;

    /**
     * 拼接好看一点
     *
     * @param pattern
     * @param arguments
     * @return
     */
    public static String getContext(String pattern, Object... arguments) {
        return MessageFormat.format(pattern, arguments);
    }
}
